<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<html>
<body>
<jsp:include page="_room_header.jsp"></jsp:include>

<form action="overtimeList.do" method="post" id="form1">
	<table>
		<tr>
			<td><span id="roomIdSpan"> 房间id: </span></td>
			<td><input type="text" value="${roomId}" name="roomId" id="roomId" /></td>
			<td><label class="control-label" for="sendtime">到期时间 :</label></td>
			<td>
				<div class="controls">
					<div class="input-append datepicker" id="datetimepicker"   pickTime=true >
					    <input data-format="yyyy-MM-dd" type="text" name="overTime" id="overTime" value="${overTime}"></input>
					    <span class="add-on">
					      <i data-time-icon="icon-time" data-date-icon="icon-calendar"></i>
					    </span>
				  	</div>	
				</div>
			</td>
			<td><input type="submit" class="btn"  value="查询"></input> </td>
		</tr>
		<tr>
			<td>
				到期房间数:  
			</td>
			<td>
				<div style="color:red;">${allcount}</div>
			</td>
		</tr>
	</table>
	
	
	
</form>

<table class="table table-bordered">
  <thead>
    <tr>
      <th>序号</th>
      <th>ID</th> 
      <th>名称</th>
      <th>样式</th>
      <th>房主</th>
      <th>创建时间</th>
      <th>到期时间</th>
      <th>行为</th>
    </tr>
  </thead>
  <tbody>
  <c:forEach var="room" items="${list}" varStatus="rooms" >
    <tr>
   	  <td>${rooms.count}</td>
      <td>${room.roomId}</td>
      <td>${room.name}</td>
      <td>${room.style}</td>
      <td><tags:user id="${room.playerId}"/></td>
      <td>${room.createDate}</td>
      <td>${room.expiredAt}</td>
      <td>
      	${empty room.expiredAt ? '到期解散' : '自然到期' }
      </td>
    </tr>
  </c:forEach>
  </tbody>
</table>
</body>
</html>